package com.pinda.feign.authapi;

import com.pinda.authorization.entity.pinda.base.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import com.pinda.base.entity.PdArea;
import java.util.List;

@FeignClient(
        value = "auth-server",
        path = "/pd-area",
        contextId = "AreaApi",
        url = "http://localhost:2002"
)
public interface AreaApi {//未找到实现
    @GetMapping({"/{id}"})
    R<PdArea> get(@PathVariable("id") Long id);

    @GetMapping({"/code/{code}"})
    R<PdArea> getByCode(@PathVariable("code") String code);

    @GetMapping("findAll")
    R<List<PdArea>> findAll(@RequestParam(value = "parentId",required = false) Long parentId, @RequestParam(value = "ids",required = false) List<Long> ids);
}

